import React from 'react';
import { Input } from 'antd';

const Duration = ({ value = { durationText: '' }, onChange, ...options }) => {
    const { duration, durationText } = value;
    const handleOnChange = changeValue => {
        console.log(duration);
        if (onChange) {
            onChange(changeValue);
        }
    };

    return <Input onChange={handleOnChange} value={durationText} {...options} disabled />;
};

export default Duration;
